#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2025/5/15 10:07
# @Author  : XH
# @File    : assert_tools.py
# @Software: PyCharm
# def common_assert(resp, status_code, success, code, message):
#     assert status_code == resp.status_code
#     # assert success is resp.json().get("success")
#     # assert code == resp.json().get("code")
#     assert message in resp.json().get("message")
def common_assert(resp, status_code, message,total):
    assert status_code == resp.status_code
    assert message in resp.json().get("msg")
    print(f'11111111111111111111111:{resp.json().get("msg")}')
    print(f'11111111111111111111112:{resp.json().get("data").get("pagination")}')
    print(f'11111111111111111111113:{resp.json().get("data")["pagination"]["total"]}')
    assert total == resp.json().get("data").get("pagination").get("total")

